<?php
namespace App\Services\Finance;

use App\Repositories\Finance\FinanceRecordRepository;

class FinanceRecordService
{
    private $service;

    public function __construct()
    {
        $this->service = new FinanceRecordRepository();
    }

    public function getAdminIndex()
    {
        return $this->service->getAdminIndex();
    }

    /**
     * 当前用户收益
     */
    public function getApiIndex($uid,$page)
    {
        return $this->service->getApiIndex($uid,$page);
    }

    public function setAdd($data)
    {
        return $this->service->setAdd($data);
    }

    public function setModify($data,$id)
    {
        return $this->service->setModify($data,$id);
    }

    public function getOne($id)
    {
        return $this->service->getShowOne($id);
    }

    /**
     * 通过订单ID，获取记录
     */
    public function getOneByOrder($orderId,$status=0)
    {
        return $this->service->getOneByOrder($orderId,$status);
    }
}